'use strict';
/**
 * @fileoverview 激活码信息
 * @author sundbcn@gmail.com (sun debing)
 */

var mongoose = require('mongoose');
var _ = require('lodash');

/**
 * 激活码信息
 */
var cdkInfoSchema = new mongoose.Schema({
    // 激活码
    cdk: {
        type: String,
        required: true,
        unique: true,
        index: true
    },

    // 激活码类型
    cdk_type: {
        type: Number,
        required: true
    },

    // 激活码使用次数
    cdk_used: {
        type: Number,
        required: true,
        default: 0
    }
});

mongoose.model('CdkInfo', cdkInfoSchema);
